import request from "./useRequests";
import { userinfo } from '@/stores/counter'
import { ElMessage } from 'element-plus'

export default function getHotNews() {
    const user = userinfo()
    async function getHotList() {
        try {
            const res = await request({
                method: "get",
                url: `/article/hot`
            })
            return res.data.data;

        } catch (err: any) {
            //alert(err)
        }
    }

    return {
        getHotList
    }
}